<template>
  <span @click="click()"
    ><span id="name">{{ name }}</span
    >&nbsp;<span v-if="showTag" id="from">&nbsp;{{ tag }}&nbsp;</span></span
  >
</template>

<script>
import { fake } from "../../assets/fake";
export default {
  data() {
    return {
      // isAdmin: false,
    };
  },
  components: {},
  props: {
    name: {
      type: String,
    },
    tag: {
      type: String,
      default: "楼主",
    },
    showTag: {
      type: Boolean,
      default: false,
    },
  },
  methods: {
    click() {
      this.$emit("touch");
    },
  },
  mounted() {
    // if (fake.self !== null) {
    //   this.isAdmin = fake.self.isAdmin;
    // }
  },
};
</script>

<style scoped>
#from {
  font-size: 14px;
  color: #41b883;
  border: 1px solid #41b883;
  border-radius: 5px;
}
#name {
  color: rgb(0, 0, 0);
}
</style>